dim ws : set ws = CreateObject("WScript.Shell")
dim varName : varName = "DrcMode"
dim regPath : regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
dim varValue : varValue = ws.RegRead(regPath)
Application.StatusBarText =""

dim doc
set doc = Application.ActiveDocument
select case varValue
	case 0
		varValue = 1
		ws.RegWrite regPath, varValue, "REG_EXPAND_SZ"
		Application.StatusBarText = "DRC ON"
		Application.ModelessCommand("D")
		DlgModelessCmd.Command = "DR"
		DlgModelessCmd.Command = "DRP"
		DlgModelessCmd.OnOk()
	case 1
		varValue = 0
		ws.RegWrite regPath, varValue, "REG_EXPAND_SZ"
		Application.StatusBarText ="DRC OFF"		
		Application.ModelessCommand("D")
		DlgModelessCmd.Command = "DR"
		DlgModelessCmd.Command = "DRO"
		DlgModelessCmd.OnOk()
end select
set ws = nothing
